package com.ktgj.customer.service.impl;

import java.util.List;
import com.ktgj.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.customer.mapper.RightdetailTypeMapper;
import com.ktgj.customer.domain.RightdetailType;
import com.ktgj.customer.service.IRightdetailTypeService;

/**
 * 权益类型Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-07-30
 */
@Service
public class RightdetailTypeServiceImpl implements IRightdetailTypeService 
{
    @Autowired
    private RightdetailTypeMapper rightdetailTypeMapper;

    /**
     * 查询权益类型
     * 
     * @param rightdetailTypeId 权益类型ID
     * @return 权益类型
     */
    @Override
    public RightdetailType selectRightdetailTypeById(Long rightdetailTypeId)
    {
        return rightdetailTypeMapper.selectRightdetailTypeById(rightdetailTypeId);
    }

    /**
     * 查询权益类型列表
     * 
     * @param rightdetailType 权益类型
     * @return 权益类型
     */
    @Override
    public List<RightdetailType> selectRightdetailTypeList(RightdetailType rightdetailType)
    {
        return rightdetailTypeMapper.selectRightdetailTypeList(rightdetailType);
    }

    /**
     * 新增权益类型
     * 
     * @param rightdetailType 权益类型
     * @return 结果
     */
    @Override
    public int insertRightdetailType(RightdetailType rightdetailType)
    {
        rightdetailType.setCreateTime(DateUtils.getNowDate());
        return rightdetailTypeMapper.insertRightdetailType(rightdetailType);
    }

    /**
     * 修改权益类型
     * 
     * @param rightdetailType 权益类型
     * @return 结果
     */
    @Override
    public int updateRightdetailType(RightdetailType rightdetailType)
    {
        return rightdetailTypeMapper.updateRightdetailType(rightdetailType);
    }

    /**
     * 批量删除权益类型
     * 
     * @param rightdetailTypeIds 需要删除的权益类型ID
     * @return 结果
     */
    @Override
    public int deleteRightdetailTypeByIds(Long[] rightdetailTypeIds)
    {
        return rightdetailTypeMapper.deleteRightdetailTypeByIds(rightdetailTypeIds);
    }

    /**
     * 删除权益类型信息
     * 
     * @param rightdetailTypeId 权益类型ID
     * @return 结果
     */
    @Override
    public int deleteRightdetailTypeById(Long rightdetailTypeId)
    {
        return rightdetailTypeMapper.deleteRightdetailTypeById(rightdetailTypeId);
    }
}
